project(FTPServer LANGUAGES CXX)

add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/3rd/fmt")

file(GLOB SRC_FILES "*.cpp" "*.c")

add_executable(FTPServer ${SRC_FILES})

target_include_directories(FTPServer PUBLIC
    ${CMAKE_SOURCE_DIR}/libevent/include
    ${CMAKE_SOURCE_DIR}/libevent
    ${CMAKE_SOURCE_DIR}/demo/TcpServer
    ${CMAKE_CURRENT_SOURCE_DIR}/3rd/fmt
    "./"
)

target_link_libraries(FTPServer PUBLIC
    TcpServer
    event_extra
    event_core
    AsyncLogger-static
    fmt::fmt
)

if(WIN32)
    target_link_libraries(FTPServer PUBLIC ws2_32)
else()
    target_link_libraries(FTPServer PUBLIC pthread)
endif()

